package com.mrchip;

public class Main {

    public static void main(String[] args) {
	// write your code here
        HttpAccess httpAccess = HttpAccess.getInstance();
        httpAccess.setHost("192.168.0.6:8000");
        HttpResponser httpResponser = new HttpResponser();
        httpAccess.setResponser("Login", httpResponser);
        httpAccess.setResponser("Register", httpResponser);
        httpAccess.setResponser("Attend", httpResponser);
        httpAccess.setResponser("Leave", httpResponser);
        httpAccess.setResponser("Query", httpResponser);
        try {
            httpAccess.login("Test", "Test");
            Thread.sleep(1000);
            httpAccess.attend("2684721c-5551-40c1-be6d-8ce9a7f335e5");
            Thread.sleep(1000);
            httpAccess.leave("2684721c-5551-40c1-be6d-8ce9a7f335e5");
            Thread.sleep(1000);
            httpAccess.query("2684721c-5551-40c1-be6d-8ce9a7f335e5");
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
